package com.hq.ims.data.entityenum;

import com.hq.web.penum.IBaseEnum;

/**
 * 消息渠道
 */
public enum EnumMessageChannel implements IBaseEnum {

    SMS(0, "SMS"),

    AppPush(1, "APP推送"),

    AppSms(2, "app加短信"),

    SiteInfo(3, "站内信"),

    Applets(4, "小程序"),

    PublicAccount(5, "公众号"),

    ;


    private final int code;
    private final String typeName;

    EnumMessageChannel(int code, String typeName) {
        this.code = code;
        this.typeName = typeName;
    }

    public static EnumMessageChannel getByName(String name) {
        for (EnumMessageChannel value : values()) {
            if (value.name().equals(name)) {
                return value;
            }
        }
        return null;
    }

    @Override
    public int getCode() {
        return code;
    }

    @Override
    public String getValue() {
        return typeName;
    }
}
